import service from '@/utils/request'

// @Tags MilkCoupon
// @Summary 创建MilkCoupon
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MilkCoupon true "创建MilkCoupon"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /milkCoupon/createMilkCoupon [post]
export const createMilkCoupon = (data) => {
  return service({
    url: '/milkCoupon/createMilkCoupon',
    method: 'post',
    data
  })
}

// @Tags MilkCoupon
// @Summary 删除MilkCoupon
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MilkCoupon true "删除MilkCoupon"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /milkCoupon/deleteMilkCoupon [delete]
export const deleteMilkCoupon = (data) => {
  return service({
    url: '/milkCoupon/deleteMilkCoupon',
    method: 'delete',
    data
  })
}

// @Tags MilkCoupon
// @Summary 删除MilkCoupon
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除MilkCoupon"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /milkCoupon/deleteMilkCoupon [delete]
export const deleteMilkCouponByIds = (data) => {
  return service({
    url: '/milkCoupon/deleteMilkCouponByIds',
    method: 'delete',
    data
  })
}

// @Tags MilkCoupon
// @Summary 更新MilkCoupon
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.MilkCoupon true "更新MilkCoupon"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /milkCoupon/updateMilkCoupon [put]
export const updateMilkCoupon = (data) => {
  return service({
    url: '/milkCoupon/updateMilkCoupon',
    method: 'put',
    data
  })
}

// @Tags MilkCoupon
// @Summary 用id查询MilkCoupon
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.MilkCoupon true "用id查询MilkCoupon"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /milkCoupon/findMilkCoupon [get]
export const findMilkCoupon = (params) => {
  return service({
    url: '/milkCoupon/findMilkCoupon',
    method: 'get',
    params
  })
}

// @Tags MilkCoupon
// @Summary 分页获取MilkCoupon列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取MilkCoupon列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /milkCoupon/getMilkCouponList [get]
export const getMilkCouponList = (params) => {
  return service({
    url: '/milkCoupon/getMilkCouponList',
    method: 'get',
    params
  })
}
